<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>交易详情</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!--base css-->
    <link href="../css/mui/mui.css" rel="stylesheet">
    <link href="../css/app/default.css" rel="stylesheet">
    <!--自定义css-->
    <link href="../css/app/app.css" rel="stylesheet">
</head>

<body>
    <div class="mui-content">
        <div class="widget widget-default account-details">
            <div class="widget-body">
                <div class="text-center title" id="name"></div>
                <div class="text-center now-price" id="amount"></div>
                <div class="display-box">
                    <div class="gray" id="jyje">交易金额</div>
                    <div class="web-box1 nk-s text-right" id="payPrice"></div>
                </div>
                <div class="display-box">
                    <div class="sub-skin1" id="yhlj">优惠立减</div>
                    <div class="web-box1 sub-skin1 nk-s text-right" id="differencePrice"></div>
                </div>
            </div>
        </div>
        <div class="widget widget-default account-details">
            <div class="widget-body">
                <div class="display-box">
                    <div class="gray">付款方式</div>
                    <div class="web-box1 nk-s text-right" id="channel"></div>
                </div>
                <div class="display-box">
                    <div class="gray">费用说明</div>
                    <div class="web-box1  nk-s text-right" id="businessName"></div>
                </div>
            </div>
        </div>
        <div class="widget widget-default account-details">
            <div class="widget-body">
                <div class="display-box">
                    <div class="gray">创建时间</div>
                    <div class="web-box1 nk-s text-right" id="createAt"></div>
                </div>
                <div class="display-box">
                    <div class="gray">交易流水号</div>
                    <div class="web-box1  nk-s text-right" id="tranNo"></div>
                </div>
            </div>
        </div>
    </div>
    <script src="../js/dsbridge.js"></script>
    <script src="../js/jquery.js"></script>
    <script src="../js/mui/mui.js"></script>
    <script src="../js/mui/mui.picker.min.js"></script>
    <script src="../js/layer.js"></script>
    <script src="../js/app/app-base.js"></script>
    <script src="../js/app/app-url.js"></script>
    <script src="../js/app/app-ajax.js"></script>

    <script>
        var tradeVO = "";
        $(function () {
            tradeVO = dsBridge.call("getJson", "");
            if (tradeVO != '') {
                tradeVO = strToJson(tradeVO);
                if (tradeVO.code == "0004") {
                    $("#jyje").html("提现金额");
                    $("#yhlj").html("提现手续费");
                }

                var name = '';
                if (tradeVO.name != null && tradeVO.name != 'null') {
                    name = tradeVO.name;
                }
                $("#name").html(name);
                // 优惠立减
                var dif = tradeVO.amount - tradeVO.payAmt;
                if (dif > 0)
                    $("#differencePrice").html("-￥" + dif.toFixed(2));
                else
                    $("#differencePrice").html("￥" + dif.toFixed(2));
                if (tradeVO.amount > 0) {
                    // $("#amount").addClass("blue-3");
                    var payAmt = parseFloat(tradeVO.payAmt).toFixed(2);
                    $("#amount").html("￥" + payAmt);
                } else {
                    // $("#amount").addClass("orange-3");
                    var payAmt = parseFloat(tradeVO.payAmt).toFixed(2);
                    $("#amount").html("￥" + payAmt);
                };
                $("#channel").html(tradeVO.channel);
                $("#payPrice").html("￥" + Math.abs(tradeVO.amount).toFixed(2));
                $("#businessName").html(tradeVO.businessName);
                $("#createAt").html(tradeVO.createAt);
                $("#tranNo").html(tradeVO.tranNo);
            }

        });
    </script>
</body>

</html>